We will develop a prototype computer program (an "expert system") that could act as a consultant in the diagnosis and management of depression. Health professionals would interact with the program as they might with a human consultant, describing the patient, receiving advice, and asking the consultant about the rationale for each recommendation. The program will use a knowledge base constructed by encoding the clinical expertise of a skilled psychiatrist in a series of rules. It will use this knowledge base to decide on the most likely diagnosis (endogenous or nonendogenous depression), assess the need for hospitalization, and recommend specific somatic treatments when this is indicated (e.g., tricyclic and antidepressants). The treatment recommendation will take into account the patient's diagnosis, age, concurrent illnesses, and concurrent treatments (drug interactions). This interdisciplinary research project brings together experts in psychiatric diagnosis and in artificial intelligence, and we expect that the results will be of significant benefit to both fields. The potential benefits for psychiatry are both theoretical and practical. If the computer program is able to make accurate diagnoses and prescribe potentially effective treatment, then relatively skilled psychiatric consultation would be widely available in underserved areas. These include some public mental health facilities where patients are seen by non-psychiatrists with relatively little direct patient-physician contact.